import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import mavonEditor from 'mavon-editor';
import 'mavon-editor/dist/css/index.css';
import 'github-markdown-css/github-markdown.css'
import 'highlight.js/styles/atom-one-dark.css' 
import hljs from 'highlight.js'
import axios from 'axios'
Vue.prototype.$axios = axios
axios.defaults.baseURL = 'http://localhost:8888/'
// axios.defaults.baseURL = 'http://114.116.113.53:8088/api/'  //关键代码
Vue.config.productionTip = false
Vue.directive('highlight', function (el) {
  const blocks = el.querySelectorAll('pre code')
  blocks.forEach(block => {
    hljs.highlightBlock(block)
  })
})
Vue.use(mavonEditor);
import showdown from 'showdown';
Vue.prototype.converter = new showdown.Converter();
// import axios from 'axios';
// import  Axios  from 'axios';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false
// Vue.prototype.$axios = axios
// Axios.defaults.baseURL = '/api'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
